package com.heatup.apt.api.service;

import com.heatup.apt.model.api.ApiResultModel;

import java.util.Date;
import java.util.List;
import java.util.Map;


public interface CourseSignService {

    /**
     * 根据用户id 课程id查询用户课程信息
     *
     * @param courseId
     * @param userId
     */
    List<Map<String, Object>> queryUserCourseInfo(Integer userId, Integer courseId, Integer isclose, Integer orderId);

    /**
     * 销课
     *
     * @param storeId   门店地址
     * @param closeTime 销课时间
     * @return
     */
    Integer closeCourse(Integer id, Integer storeId, Date closeTime, Date startTime);

    /**
     * 课程详情
     *
     * @param courseId 课程ID
     * @param mobile   教练手机  @return
     * @throws Exception
     */
    Map<String, Object> chaxuCoachCourseInfoById(Integer courseId, String mobile) throws Exception;

    /**
     * 用户签到
     *
     * @param courseId 课程ID
     * @param openId   用户openId
     * @return
     * @throws Exception
     */
    ApiResultModel courseCoachUserSign(Integer courseId, String openId) throws Exception;

    /**
     * 用户签到详情
     *
     * @param courseId 课程ID
     * @param userId   用户Id
     * @return
     * @throws Exception
     */
    ApiResultModel courseUserSignInfo(Integer courseId, Integer userId) throws Exception;

    /**
     * 教练 檬营开启/关闭签到
     *
     * @param courseId     课程 ID
     * @param courseNumber 课时时序
     * @param userId 用户 ID
     * @param type         签到类型 1开启 0关闭
     * @return
     */
    boolean campCourseSignIn(Integer courseId, Integer courseNumber, Integer userId, Integer type) throws Exception;

    int updateCancelCourse(String num, String id, String courseId,
                           String storeId, String orderId, String startTime, String closeTime, Integer userId) throws Exception;

}
